#ifndef __UART_H__
#define __UART_H__

#include "main.h"
#include "stm32f1xx_hal.h"

#include <stdbool.h>

#define TX_LEN 256
#define RX_LEN 512

typedef enum { USART_DMA_SENDOVER, USART_DMA_SENDING } eTxStatus;

void uart_init(void);
void uart_send(uint8_t* data, uint16_t len);
uint16_t uart_getlen(void);
uint16_t uart_receive(uint8_t* data, uint16_t len);
uint8_t uart_getbyte(uint8_t* byte);
void uart_clear(void);

#endif
